public class TaxedAmount extends Object implements XMLMarshallable
TaxStatus enumeration)TaxDetailModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="taxedAmount">
<xs:complexType>
<xs:sequence>
<xs:element ref="taxDetail" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="taxationModule" type="AccountTaxationModuleType" default="vatTaxationModule"/>
<xs:attribute name="isGrossAmount" type="xs:boolean" default="false"/>
<xs:attribute name="taxAmount" type="xs:decimal" default="0"/>
<xs:attribute name="totalAmount" type="xs:decimal" default="0"/>
<xs:attribute name="taxCoefficient" type="xs:decimal" default="1"/>
<xs:attribute name="taxCode" type="xs:string" default="NO_TAX"/>
<xs:attribute name="taxStatus" type="TaxStatusType" default="tsNoTax"/>
<xs:attribute name="prepaidBalanceTaxationType" type="PrepaidBalanceTaxationTypeType" default="taxExcluded"/> <!-- the subscriber balance is tax included/excluded -->
<xs:attribute name="useOldModel" type="xs:boolean" default="false"/>
</xs:complexType>
</xs:element><xs:simpleType name="PrepaidBalanceTaxationTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="taxIncluded"/> <!-- postpaid receivable account -->
<xs:enumeration value="taxExcluded"/> <!-- postpaid payable account (for partner)-->
</xs:restriction>
</xs:simpleType><xs:simpleType name="TaxStatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="tsNoTax"/>
<xs:enumeration value="tsForInfo"/>
<xs:enumeration value="tsApplied"/>
<xs:enumeration value="tsTaxExempted"/>
<xs:enumeration value="tsTaxMissedForInfo"/>
<xs:enumeration value="tsTaxMissedForApply"/>
<xs:enumeration value="tsUnknown"/>
</xs:restriction>
</xs:simpleType>
| Modifier and Type | Field and Description |
|---|---|
static int |
TAX_EXCLUDED
Type for postpaid tax included balance (default)
|
static int |
TAX_INCLUDED
Type for postpaid tax excluded balance
|
| Constructor and Description |
|---|
TaxedAmount()
Builds an empty taxed amount object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
BigDecimal |
getRoundedTotalAmount()
Gets the rounded amount.
|
BigDecimal |
getTaxAmount()
Gets the tax amount.
|
com.highdeal.tax.Tax.TaxationModule |
getTaxationModule()
Gets the tax sytem set for the account.
|
String |
getTaxCode()
Returns the tax code.
|
BigDecimal |
getTaxCoefficient()
Gets the tax coefficient.
|
List<TaxDetailModel> |
getTaxDetails()
Returns a list of
TaxDetailModel. |
TaxStatus |
getTaxStatus()
Gets the tax status.
|
BigDecimal |
getTotalAmount()
Gets the gross amount.
|
boolean |
isGrossAmount()
Gets the gross amount flag.
|
boolean |
isValid()
Returns true if the taxed amount is valid;
Taxed amount is valid if it contains a tax amount and a valid tax detail if any.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setGrossAmount(boolean isGrossAmount)
Sets the gross amount flag.
|
void |
setRoundedTotalAmount(BigDecimal roundedtotalAmount)
Sets the rounded amount.
|
void |
setTaxAmount(BigDecimal taxAmount)
Sets the tax amount.
|
void |
setTaxationModule(com.highdeal.tax.Tax.TaxationModule taxationModule)
Sets the taxation module for the account.
|
void |
setTaxCode(String code)
Sets the tax code.
|
void |
setTaxCoefficient(BigDecimal taxCoef)
Sets the tax coefficient.
|
void |
setTaxStatus(TaxStatus taxStatus)
Sets the tax status.
|
void |
setTotalAmount(BigDecimal totalAmount)
Sets the gross amount.
|
String |
toString()
Returns a string representation of the taxed amount.
|
public static final int TAX_EXCLUDED
public static final int TAX_INCLUDED
public com.highdeal.tax.Tax.TaxationModule getTaxationModule()
Tax.TaxationModulepublic void setTaxationModule(com.highdeal.tax.Tax.TaxationModule taxationModule)
taxationModule - The tax system set for this accountto know available modules to tax this accountpublic boolean isGrossAmount()
public void setGrossAmount(boolean isGrossAmount)
isGrossAmount - The gross amount flagpublic BigDecimal getTaxAmount()
public void setTaxAmount(BigDecimal taxAmount)
taxAmount - The tax amountpublic BigDecimal getTotalAmount()
public void setTotalAmount(BigDecimal totalAmount)
totalAmount - The gross amountpublic BigDecimal getRoundedTotalAmount()
public void setRoundedTotalAmount(BigDecimal roundedtotalAmount)
roundedtotalAmount - the rounded amount.public BigDecimal getTaxCoefficient()
public void setTaxCoefficient(BigDecimal taxCoef)
taxCoef - The tax coefficientpublic String getTaxCode()
public void setTaxCode(String code)
code - The tax codepublic TaxStatus getTaxStatus()
public void setTaxStatus(TaxStatus taxStatus)
taxStatus - The tax statusTaxStatuspublic List<TaxDetailModel> getTaxDetails()
TaxDetailModel.TaxDetailModelpublic boolean isValid()
true if the taxed amount is valid, false otherwisepublic String toString()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into